package com.bjb.vr.common.mapper;

import com.bjb.vr.common.ao.ResPackageDetailRemoveAo;
import com.bjb.vr.common.dto.ResFavorites;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author admin
 * @description 针对表【res_favorites】的数据库操作Mapper
 * @createDate 2022-03-18 18:00:07
 * @Entity com.bjb.vr.common.dto.ResFavorites
 */
public interface ResFavoritesMapper extends MPJBaseMapper<ResFavorites> {

    /**
     * 根据用户id和资源id查询资源收藏
     *
     * @param accountId
     * @param resId
     * @return
     */
    ResFavorites selectByCondition(@Param("accountId") Long accountId, @Param("resId") Long resId);

    /**
     * 根据用户id查询收藏资源总和
     * @param accountId
     * @return
     */
    Integer queryFavoritesSizeByAccountId(@Param("accountId") Long accountId);

    Integer deleteByResId(ResPackageDetailRemoveAo resPackageDetailRemoveAo);
}




